package com.kingsoft.dc.khaos.module.spark.constants

/**
  * Created by WANGYING15 on 2019/9/19.
  */
object CheckRuleConstants {

  /**
    * 技术检核规则常量
    */
  final val MESSY_CODE_RULE_ID = 11
  final val ESCAPE_CHAR_RULE_ID = 12
  final val STRING_CONTENT_LENGTH_RULE_ID = 13
  final val NUMBER_CONTENT_LENGTH_RULE_ID = 14
  final val DECIMAL_CONTENT_LENGTH_RULE_ID = 15
  final val DATE_CONTENT_FORMAT_RULE_ID = 16
  final val TIME_CONTENT_FORMAT_RULE_ID = 17
  final val DATETIME_CONTENT_FORMAT_RULE_ID = 18
  final val ALL_RULE_ID = Array(11, 12, 13, 14, 15, 16, 17, 18)

  final val MESSY_CODE_RULE_TYPE = "MESSY_CODE"
  final val ESCAPE_CHAR_RULE_TYPE = "ESCAPE_CHAR"
  final val CONTENT_LENGTH_RULE_TYPE = "CONTENT_LENGTH"
  final val CONTENT_FORMAT_RULE_TYPE = "CONTENT_FORMAT"
  final val ALL_RULE_TYPE = Array("MESSY_CODE", "ESCAPE_CHAR", "CONTENT_LENGTH", "CONTENT_FORMAT")

  final val MESSY_CODE_REPLACED_VALUE = "?"
  final val ESCAPE_CHAR_REPLACED_VALUE = " "
  final val DATE_FORMAT_STYLE_ARRAY = Array("yyyy-MM-dd", "yyyy/MM/dd", "yyyyMMdd")
  final val TIME_FORMAT_STYLE_ARRAY = Array("HH:mm:ss", "HHmmss", "HH:mm:ss:SSS", "HHmmssSSS")
  final val DATETIME_FORMAT_STYLE_ARRAY = Array("yyyy-MM-dd HH:mm:ss", "yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss:SSS",
                                        "yyyyMMddHHmmssSSS", "yyyy/MM/dd HH:mm:ss", "MM-dd HH:mm:ss", "MMddHHmmss")

}
